/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package wggcth.persistencia.vo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author deusemar
 */
@Embeddable
public class DadosExperimentoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "IDVARIAVEL", nullable = false)
    private int idvariavel;
    @Basic(optional = false)
    @Column(name = "IDAMOSTRA", nullable = false)
    private int idamostra;
    @Basic(optional = false)
    @Column(name = "IDEXPERIMENTO", nullable = false)
    private int idexperimento;

    public DadosExperimentoPK() {
    }

    public DadosExperimentoPK(int idvariavel, int idamostra, int idexperimento) {
        this.idvariavel = idvariavel;
        this.idamostra = idamostra;
        this.idexperimento = idexperimento;
    }

    public int getIdvariavel() {
        return idvariavel;
    }

    public void setIdvariavel(int idvariavel) {
        this.idvariavel = idvariavel;
    }

    public int getIdamostra() {
        return idamostra;
    }

    public void setIdamostra(int idamostra) {
        this.idamostra = idamostra;
    }

    public int getIdexperimento() {
        return idexperimento;
    }

    public void setIdexperimento(int idexperimento) {
        this.idexperimento = idexperimento;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idvariavel;
        hash += (int) idamostra;
        hash += (int) idexperimento;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DadosExperimentoPK)) {
            return false;
        }
        DadosExperimentoPK other = (DadosExperimentoPK) object;
        if (this.idvariavel != other.idvariavel) {
            return false;
        }
        if (this.idamostra != other.idamostra) {
            return false;
        }
        if (this.idexperimento != other.idexperimento) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "wggcth.persistencia.vo.DadosExperimentoPK[idvariavel=" + idvariavel + ", idamostra=" + idamostra + ", idexperimento=" + idexperimento + "]";
    }

}
